package com.xhji.web.mvc.exception;

import com.xhji.web.mvc.response.GenericResponse;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

/**.
 * 校验失败
 **/
@Data
@NoArgsConstructor
public class ValidationException extends AbstractException {
    private List<GenericResponse.FieldError> fieldErrors;
    public ValidationException(List<GenericResponse.FieldError> fieldErrors) {
        super(400, "参数校验失败", null);
        this.fieldErrors = fieldErrors;
    }
}
